feat: add GitHub Copilot CLI and app support#2323
Conversation
Add one shared Agent Skills host contract for Copilot CLI and the Copilot desktop app, including generation, setup, upgrades, uninstall, documentation, and focused regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
E2E failure root-cause reportI downloaded the complete logs and result artifacts for all seven failing eval shards plus This is a cross-repository fork PR (
The workflow explicitly maps Why these tests ran: Local controls:
I am not changing the workflow in this host-support PR. Using No code change or empty commit is warranted. The actionable remediation is a trusted base-repository rerun with provider secrets, or a separate workflow-policy change owned by maintainers. |
Eval failures are fork-secret injection, not a code defectThe red That surfaces as Why this PR runs the evals when most fork PRs don'tThe diff-based selector expands to The non-secret gates all pass: actionlint, check-freshness, build-image, windows-free-tests, windows-setup, plus the new non-LLM unit tests ( To get real green evals (needs a maintainer with write access)Push this PR's existing commits to an upstream branch (fork and parent share git objects — no rework), then open the PR from there so CI has the secrets: git fetch origin pull/2323/head
git push origin FETCH_HEAD:refs/heads/copilot-host-support
# then open a PR from garrytan/gstack:copilot-host-support -> main and close this as supersededOr, since the eval reds are purely secret-availability and not code defects, this can be merged on the strength of the gates above. |
Problem
gstack has no official GitHub Copilot host, so generated skills, installation paths, setup detection, and runtime assets do not work as one supported flow in either the standalone GitHub Copilot CLI or GitHub Copilot desktop app project sessions.
GitHub documents one Agent Skills contract for both surfaces. This change adds one declarative
copilothost instead of duplicating path roots or maintaining separate CLI and app variants.Verified Copilot contract
copilotexecutable. Do not treat legacygh copilotas a current detection alias.~/.copilot/skillsand~/.agents/skills. gstack uses~/.copilot/skillsto avoid Codex's existing.agentsnamespace..github/skills,.agents/skills, and.claude/skills. gstack uses.github/skillsso local Copilot installs cannot clobber Codex's.agents/skills/gstack.nameanddescription; names match their directories, use lowercase hyphenated identifiers, and stay within 64 characters; descriptions stay within 1024 characters.COPILOT_HOMErelocates Copilot CLI configuration. gstack resolves the personal skill root through it and normalizes Git Bash paths.The resulting host contract is:
Implementation
hosts/copilot.tsand registers it as the eleventh host..copilot/skills, withgstack-frontmatter names that match their generated directories.nameanddescriptionin frontmatter and enforces GitHub's name and description limits.bash,view,task,skill, andask_usersemantics.skillandtask; suppresses optional gbrain context/save blocks and excludes/codex.COPILOT_HOMEhandling, uninstall cleanup, runtime sidecars, and host-aware upgrades..source-pathin the Copilot runtime root so upgrades refresh from the source checkout without copying a repository into the installed skill tree.Validation
bun run scripts/host-config-export.ts validatebun run gen:skill-docs --host copilotbun run gen:skill-docs --host all --dry-runbun test test/copilot-host.test.ts test/host-config.test.ts test/gen-skill-docs.test.ts test/setup-windows-fallback.test.tsbun run buildbun testHOME/COPILOT_HOMEcopilot skill list --json; runtime assets resolved.github/skills; runtime assets resolvedgstack-carefulinvoked successfully and returnedGSTACK_COPILOT_SKILL_OKgstack-careful, returningAPP_GSTACK_COPILOT_SKILL_OKbun run skill:checkremains blocked by the existing missing generatedclaude/SKILL.md; the same failure reproduces onorigin/main. The Windows-safe suite's observability marker assertion also reproduces onorigin/mainbecause it expects six markers while main currently has five. Neither baseline was changed or hidden here.Paid evals were not run locally. GitHub started them for this fork PR, but
pull_requestworkflows do not receive the base repository'sANTHROPIC_API_KEY. Seven Anthropic-backed jobs therefore stop before skill execution witherror_api, zero tokens, and zero cost; the aggregatereportjob mirrors those failures. The same judge and/gstack-upgradeevals reproduce onorigin/mainwhen run without credentials. Deterministic freshness, Windows, setup, lint, and build-image checks pass.This change is deterministic host plumbing covered by static validation, generator tests, setup tests, hermetic installs, and live discovery/invocation.
Live versus contract-level app coverage
The desktop app claim is not inferred from CLI behavior. A newly created Copilot project-session agent independently discovered and invoked the installed personal
gstack-carefulskill through the app's native skill tool.Repository-local
.github/skillsbehavior is covered by GitHub's shared Agent Skills documentation, focused host assertions, and a realcopilot skill list --jsonproject discovery flow. The app project-session smoke test exercised the personal root, not a second live repository-local app install.Compatibility and risk
.agents/skills/gstackremains owned by Codex. Copilot stages under.copilotand installs local skills under.github/skills, so the hosts do not share or overwrite roots.gstack-shipskill remains above the existing advisory 160 KB token ceiling. Generation warns but does not fail, matching repository policy.VERSIONbump is included.